package week7.homework;

public class schoolbook extends Books {
    private int grade;
    public schoolbook(String name, String type,String author,double price,int pages,int grade)
    {
        super(name,type,author,price,  pages);
        this.grade=grade;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public String toString()
    {
        return "\n" + "种类"+this.getType()+"\t书名"+this.getName()+"\t作者"+ this.getAuthor()+"\t价格"+this.getPrice()+"\t年级"+this.getGrade();
    }
}
